#ifndef CLOCK_H
#define CLOCK_H
#include <QString>
#include <QColor>
#include <QRect>
#include <QPainter>

class Clock
{
public:
    Clock();
    ~Clock();
    void AddItem(QString name,unsigned int m_iValue,QColor ArcColor );
    void Paint(QPainter* pPainter);
    void SetX(double dValue) {m_dX = dValue;}
    void SetY(double dValue) {m_dY = dValue;}
    void SetWidth(double dValue) {m_dWidth = dValue;}
    void SetHeight(double dValue) {m_dHeight = dValue;}
    void SetValue(unsigned int uiValue) {m_uiValue = uiValue;}
    void SetTitle(QString sTitle) {m_sTitle = sTitle;}
    void DrawRect(QPainter* pPainter);
    void DrawClock(QPainter* pPainter);
private:
    QSizeF textSize(const QFont &font, const QString &text);
    double       m_dX;
    double       m_dY;
    double       m_dWidth;
    double       m_dHeight;
    QString      m_sTitle;
    unsigned int m_uiValue;
};
#endif  // CLOCK_H
